package com.tyxy.edu.info.manager.dao;

import com.tyxy.edu.info.manager.domain.Student;

public class StudentDao {
   private static Student[] stu = new Student[5];
   public static boolean addstudent(Student student) {
      int imdex = -1;
      for (int i = 0; i < stu.length; i++) {
         Student student1 = stu[i];
         if (student1 == null) {
            imdex = i;
            break;
         }
      }
      if (imdex == -1) {
         return false;
      } else {
         stu[imdex] = student;
         return true;
      }
   }
   public Student[] findAllStudent(){
      return stu;
   }
}



